home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Technology Seed / ADC Seed CD - July 1999.toast / Carbon SDK 1.0d10c3 / Sample Code / SimpleText / MacIncludes.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-04  |  6.0 KB  |  236 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        MacIncludes.h
  3.  
  4.     Contains:    This file contains all of the Mac includes that one needs
  5.  
  6.     Version:    SimpleText 1.4 or later
  7.  
  8.     Written by:    Tom Dowdy
  9.  
  10.     Copyright:    © 1990-1997 by Apple Computer, Inc., all rights reserved.
  11.  
  12.     File Ownership:
  13.  
  14.         DRI:                Tom Dowdy
  15.  
  16.         Other Contact:        Jim Negrette
  17.  
  18.         Technology:            Macintosh Graphics Group
  19.  
  20.     Writers:
  21.  
  22.         (ted)    Tom Dowdy
  23.         (ecs)    Eric Schlegel
  24.         (Gr)    Greg Robbins
  25.         (TD)    Tom Dowdy
  26.  
  27.     Change History (most recent first):
  28.  
  29.     $Log: MacIncludes.h,v $
  30.     Revision 1.15  1999/02/19 22:10:15  danp
  31.     Removed unneeded ANSI header includes
  32.  
  33.     Revision 1.14  1999/02/10 21:09:45  danp
  34.     Added ControlDefinitions.h`
  35.     
  36.     Revision 1.13  1999/02/10 18:29:59  danp
  37.     Removed ControlDefs.h inclusion. Don't know why I put it there in the firstplace
  38.     
  39.     Revision 1.12  1999/02/04 00:04:14  kilroy
  40.     *** empty log message ***
  41.     
  42.     Revision 1.11  1998/11/25 21:01:17  wilkes
  43.     Removed all GX references.
  44.     
  45.     Revision 1.10  1998/11/19 01:16:15  wilkes
  46.     Removed reliance on QuickTime.  Most changes were conditionalized with
  47.     ALLOW_QUICKTIME...
  48.  
  49.     Revision 1.9  1998/11/11 22:28:53  wilkes
  50.     Fixed various problems caused by the interface changes made by Nitin earlier,
  51.     mostly involving static RoutineDescriptors...
  52.  
  53.     Revision 1.8  1998/10/12 18:50:54  danp
  54.     *** empty log message ***
  55.  
  56.     Revision 1.7  1998/09/15 22:54:13  voas
  57.     Changed to reflect latest Carbon header changes I just made.
  58.     
  59.     Revision 1.6  1998/09/15 18:59:44  jiarocci
  60.     SimpleText now builds with -DTARGET_CARBON=1. Still needs further cleanup.
  61.     
  62.     Revision 1.5  1998/09/02 20:44:04  danp
  63.     Minor changes for blue mwerks compiles
  64.  
  65.  
  66.     Revision 1.4  1998/08/26 16:04:13  mkellner
  67.     Make work with new (built) headers
  68.  
  69.     Revision 1.3  1998/03/20 03:19:59  mkellner
  70.     change qd.thePort to FrontWindow()
  71.     add SysEnvirons
  72.     
  73.     Revision 1.2  1998/03/19 03:55:26  mkellner
  74.     - Add <ConditionalMacros.h> and <QTMLMapNames.h>
  75.     - Fix captialization of math.h, stdio.h, strings.h, etc.
  76.     - Change Types.h, Memory.h and Windows.h to MacTypes, MacMemory, and MacWindows
  77.     - Add inital set of stubs.
  78.     - Change Types.r to MacTypes.r
  79.     
  80.     Revision 1.1.1.1  1998/03/18 22:56:10  ivory
  81.     Initial checkin of SimpleText.
  82.     
  83.         
  84.         8     8/11/97 3:49 PM Tom Dowdy
  85.         {SimpleTextSources}MacIncludes.h
  86.         
  87.         7     8/11/97 3:07 PM Tom Dowdy
  88.         rolling in nav services
  89.         
  90.         6     7/30/97 3:42 PM Tom Dowdy
  91.         Live scrolling now
  92.         
  93.         5     7/29/97 6:27 PM Tom Dowdy
  94.         Added appearance
  95.         
  96.         4     7/29/97 5:27 PM Tom Dowdy
  97.         Cleanup for QT build
  98.         
  99.         3     7/29/97 2:06 PM Tom Dowdy
  100.         Removed all of the old and boring refs
  101.         
  102.         2     7/29/97 1:52 PM Tom Dowdy
  103.         Various new interface fixes
  104.         
  105.         1     7/28/97 11:19 AM Duane Byram
  106.         first added to Source Safe project
  107.  
  108.         <11>     8/21/96    ecs        set up conditional macros if necessary
  109.         <10>     6/10/96    ted        GENERATINGCFM should really be GENERATINGPOWERPC
  110.          <9>     5/31/96    ted        fixing GX PPC calls
  111.          <8>     5/31/96    ted        adding PPC, FAT, and NuKernel builds
  112.          <7>      2/8/96    ted        Fixing SC compiler problems
  113.          <7>      2/8/96    ted        
  114.          <5>      1/5/96    ted        adding ifdef to interface version check
  115.          <4>      1/4/96    ecs        compile w/ CodeWarrior
  116.          <3>    10/17/95    Gr        Only define WindowStandardState and WindowUserState macros if
  117.                                     not already defined
  118.          <2>     9/15/95    Gr        Only define GetWindowGoAwayFlag/ZoomFlag if not already defined
  119.          <1>     8/21/95    TD        First checked in.
  120.  
  121. */
  122.  
  123.  
  124. #ifndef __MACINCLUDES__
  125. #define __MACINCLUDES__
  126.  
  127. #if (!defined(UseMacDump))
  128.  
  129. #ifndef BUILDING_FOR_SYSTEM7
  130.     #define BUILDING_FOR_SYSTEM7 1
  131. #endif
  132.  
  133. #include <MacTypes.h>
  134. #include <Resources.h>
  135. #include <Quickdraw.h>
  136. #include <Fonts.h>
  137. #include <Events.h>
  138. #include <MacWindows.h>
  139. #include <Menus.h>
  140. #include <TextEdit.h>
  141. #include <Dialogs.h>
  142. #include <ToolUtils.h>
  143. #include <MacMemory.h>
  144. #include <SegLoad.h>
  145. #include <ControlDefinitions.h>
  146. #include <Files.h>
  147. #include <OSUtils.h>
  148. #include <Traps.h>    
  149. #include <Script.h>
  150. #include <ColorPicker.h>
  151. #include <FixMath.h>
  152. #include <Packages.h>
  153. #include <Palettes.h>
  154. #include <QDOffscreen.h>
  155. #include <Sound.h>
  156. #include <Errors.h>
  157. #include <AppleEvents.h>
  158. #include <DiskInit.h>
  159. #include <Retrace.h>
  160. #include <Folders.h>
  161. #include <Lists.h>
  162. //#include <CTBUtilities.h>
  163. #include <Gestalt.h>
  164. #include <Finder.h>
  165. #include <Scrap.h>
  166. #include <Devices.h>
  167. #include <Video.h>
  168. #include <Aliases.h>
  169. #include <SoundInput.h>
  170. #include <Movies.h>
  171. #include <Printing.h>
  172. #include <Balloons.h>
  173. #include <MixedMode.h>
  174. #include <Drag.h>
  175. #include <TextServices.h>
  176. #include <TSMTE.h>
  177. #include <AppleGuide.h>
  178. //#include <Speech.h>
  179. #include <Icons.h>
  180. #include <LowMem.h>
  181. #include <CodeFragments.h>
  182. #include <TextUtils.h>
  183. #include <Appearance.h>
  184.  
  185. // #include "AGFile.h"
  186. #include "NavigationServicesSupport.h"
  187.  
  188. // Balloons.h
  189. #define kDefaultBalloonVariant    2
  190.  
  191. // For looking at all of our windows, not just the visible ones.
  192.  
  193. // No glue for this either, sigh.
  194. #define TESetClickLoop(L,H) ((**(H)).clickLoop = (L))
  195.  
  196. // defines I like to use all of the time
  197. extern void _DataInit();        // part of Runtime library
  198.  
  199. #define TopLeft(aRect)    (* (Point *) &(aRect).top)
  200. #define BotRight(aRect)    (* (Point *) &(aRect).bottom)
  201.  
  202. #define RectWidth(aRect) ((aRect).right - (aRect).left)
  203. #define RectHeight(aRect) ((aRect).bottom - (aRect).top)
  204.  
  205. #define Max(X, Y) ( ((X)>(Y)) ? (X) : (Y) )
  206. #define Min(X, Y) (  ((X)>(Y)) ? (Y) : (X) )
  207.  
  208. #define Pin(VALUE, MIN, MAX) ( ((VALUE) < (MIN)) ? (MIN) : ( ((VALUE) > (MAX)) ? (MAX) : (VALUE) ) )
  209.  
  210. #define nrequire(CONDITION, LABEL) if (true) {if ((CONDITION)) goto LABEL; }
  211. #define require(CONDITION, LABEL) if (true) {if (!(CONDITION)) goto LABEL; }
  212.  
  213. // The Pascal equivalent of strcpy, takes two Pascal string pointers
  214. #define PSTRCPY(P1, P2)    BlockMove(P2, P1, P2[0]+1)
  215.  
  216. // Concatante one character C onto the string S 
  217. #define CHARCAT(S, C)    S[(S[0]+1)] = C; S[0]++;
  218.  
  219. /* The Pascal equivalent of strcat, takes two Pascal string pointers */
  220. #define PSTRCAT(P1, P2)                         \
  221.     BlockMove(&P2[1], &P1[(P1[0]+1)], P2[0]);    \
  222.     P1[0] += P2[0];
  223.  
  224.     #if defined(MakeMacDump)
  225.         #pragma dump "MacIncludesDump"
  226.     #endif
  227.  
  228. #else        // from the if !defined at the top of the file
  229.  
  230.     #if defined(UseMacDump)
  231.         #pragma load "MacIncludesDump"
  232.     #endif
  233. #endif
  234.  
  235. #endif /* __MACINCLUDES__ */
  236.